home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
game
/
patch
/
WHDIDemos.lzh
/
Symbiosis_UltimateGameboy.lha
/
SYMBIOSIS-UGBS
/
Install
next >
Wrap
Text File
|
2002-08-18
|
4KB
|
194 lines
;****************************
(set #sub-dir "") ;sub directory containing data files
(set #readme-file "ReadMe") ;name of readme file
(set #prefix @app-name) ;name of slave, directory
(set #demo_exe "UltimateGameBoy.adf") ;name of demo exe
(set #demo_rename "Disk.1") ;new demo name
(set #site "Aminet") ;name of site hosting the file
(set #demo_url "http://www.aminet.net/demo/funet/UltGameboy.lha") ;name of archive file
(set #pt_replay "proreplay.bin") ;name of protracker replay routine
;****************************
;----------------------------
; checks if given program is installed, if not abort install
; #program - to check
(procedure P_ChkRun
(if (= 0 (run ("cd SYS:\nWhich %s >NIL:" #program)))
("")
(abort
(cat
"You must install \"" #program "\" first!\n"
"It must be accessible via the path.\n"
"You can find it in the WHDLoad package."
)
)
)
)
;----------------------------
; Wait for inserting disk
; IN: #AD_disk - name of disk
; OUT: -
(procedure P_disk
(message (cat
"\n"
"You MUST first download the demo\n"
"from \"" #site "\" and extract it to RAM:\n"
"\n"
"\"" #demo_url "\""
"\n\n"
"Ensure the file \"" #demo_exe "\" is available in RAM:"))
)
;----------------------------
;****************************
(if (< @installer-version (+ (* 44 65536) 10))
(
(message
(cat
"Warning: your installer is outdated.\n"
"Some features of this installation won't be available, "
"such as icon show and drawer opening. "
"You have version " (/ @installer-version 65536) "."
(BITAND @installer-version 65535) ", recommended is version 44.10. "
"The 'installer' 44.10 comes with OS 3.5 but is also contained in the NDK 3.9. "
"You may also use the InstallerNG by Jens Tröger."
"\n\n"
"The installers can be obtained from the net:\n"
"http://www.amiga.com/3.9/download/NDK3.9.lha\n"
"aminet:util/sys/InstallerNG.lha"
)
)
(set #newstuff 0)
)
(set #newstuff 1)
)
(if (exists #readme-file)
(if (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(set #program "WHDLoad")
(P_ChkRun)
(if (getenv "WHDLInstPath")
(set @default-dest (getenv "WHDLInstPath"))
)
(set #dest
(askdir
(prompt
(cat
"Where should \"" @app-name "\" be installed?\n"
"A drawer \"" #prefix "\" will be automatically created."
)
)
(help @askdir-help)
(default @default-dest)
)
)
(run ("setenv WHDLInstPath \"%s\"\ncopy ENV:WHDLInstPath ENVARC:" #dest))
(set #dest (tackon #dest #prefix))
(if (exists #dest) (
(set #choice
(askbool
(prompt
(cat
"\nDirectory \"" #dest "\" already exists.\n"
"Should it be deleted?"
)
)
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if (= #choice 1)
(delete #dest
(help @delete-help)
(all)
)
)
))
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("%s.Slave" @app-name))
(dest #dest)
)
(if
(exists ("%s.newicon" @app-name))
(set #icon
(askchoice
(prompt "\nWhich icon would you like to install?\n")
(default 0)
(choices "ColorIcon" "NewIcon")
(help @askchoice-help)
)
)
(set #icon 0)
)
(select #icon
(set #icon ("%s.coloricon" @app-name))
(set #icon ("%s.newicon" @app-name))
)
(copyfiles
(help @copyfiles-help)
(source #icon)
(newname ("%s.info" @app-name))
(dest #dest)
)
(if
(exists #readme-file)
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
)
(if
(exists ("%s.info" #readme-file))
(
(copyfiles
(help @copyfiles-help)
(source ("%s.info" #readme-file))
(dest #dest)
)
(tooltype
(dest (tackon #dest #readme-file))
(noposition)
)
)
)
;----------------------------
(P_disk)
(copyfiles
(help @copyfiles-help)
(source ("RAM:%s" #demo_exe))
(newname ("%s" #demo_rename))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s" #pt_replay))
(dest #dest)
)
;----------------------------
(run ("Delete \"RAM:%s\" ALL QUIET FORCE" #demo_exe))
(exit)